Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#2242] docs(open-api): Add the open-api for access control #4519

Merged
merged 12 commits into from
Aug 15, 2024

Conversation

jerqi
Copy link
Contributor

@jerqi jerqi commented Aug 14, 2024

What changes were proposed in this pull request?

Add the open-api for access control.

Why are the changes needed?

Fix: #2242

Does this PR introduce any user-facing change?

No.

How was this patch tested?

By hand.

@jerqi jerqi marked this pull request as draft August 14, 2024 13:13
@jerqi jerqi marked this pull request as ready for review August 15, 2024 03:49
@jerqi
Copy link
Contributor Author

jerqi commented Aug 15, 2024

@mchades Could you help me review this pull request?

@mchades
Copy link
Contributor

mchades commented Aug 15, 2024

Overall LGTM.

I tried to merge user_permissions.yaml and group_permissions.yaml. But it throws an error.

Can you describe the steps to reproduce it? Or provide detailed error information?

@jerqi
Copy link
Contributor Author

jerqi commented Aug 15, 2024

Overall LGTM.

I tried to merge user_permissions.yaml and group_permissions.yaml. But it throws an error.

Can you describe the steps to reproduce it? Or provide detailed error information?

Put them into one file.

[1] ../docs/open-api/user_permissions.yaml:118:5 at #/paths/1metalakes1{metalake}1permissions1users~1{user}1revoke/1metalakes1{metalake}1permissions1groups1{group}~1grant

Property /metalakes/{metalake}/permissions/groups/{group}/grant is not expected here.

116 | $ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
117 |
118 | /metalakes/{metalake}/permissions/groups/{group}/grant:
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119 | parameters:
120 | - $ref: "./openapi.yaml#/components/parameters/metalake"

referenced from ../docs/open-api/openapi.yaml:138:5 at #/paths/1metalakes1{metalake}1permissions1users~1{user}~1revoke

Error was generated by the spec rule.

[2] ../docs/open-api/user_permissions.yaml:165:5 at #/paths/1metalakes1{metalake}1permissions1users~1{user}1revoke/1metalakes1{metalake}1permissions1groups1{group}~1revoke

Property /metalakes/{metalake}/permissions/groups/{group}/revoke is not expected here.

163 | $ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
164 |
165 | /metalakes/{metalake}/permissions/groups/{group}/revoke:
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
166 | parameters:
167 | - $ref: "./openapi.yaml#/components/parameters/metalake"

referenced from ../docs/open-api/openapi.yaml:138:5 at #/paths/1metalakes1{metalake}1permissions1users~1{user}~1revoke

Error was generated by the spec rule.

[3] ../docs/open-api/openapi.yaml:141:5 at #/paths/1metalakes1{metalake}1permissions1groups~1{group}~1grant

Can't resolve $ref: ENOENT: no such file or directory '/Users/roryqi/Code/gravitino/docs/open-api/users_permissions.yaml'

139 |
140 | /metalakes/{metalake}/permissions/groups/{group}/grant:
141 | $ref: "./users_permissions.yaml#/paths/1metalakes1%7Bmetalake%7D1permissions1groups1%7Bgroup%7D1grant"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
142 |
143 | /metalakes/{metalake}/permissions/groups/{group}/revoke:

Error was generated by the no-unresolved-refs rule.

[4] ../docs/open-api/openapi.yaml:144:5 at #/paths/1metalakes1{metalake}1permissions1groups~1{group}~1revoke

Can't resolve $ref: ENOENT: no such file or directory '/Users/roryqi/Code/gravitino/docs/open-api/users_permissions.yaml'

142 |
143 | /metalakes/{metalake}/permissions/groups/{group}/revoke:
144 | $ref: "./users_permissions.yaml#/paths/1metalakes1%7Bmetalake%7D1permissions1groups1%7Bgroup%7D1revoke"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
145 |
146 | components:

Error was generated by the no-unresolved-refs rule.

@mchades
Copy link
Contributor

mchades commented Aug 15, 2024

Indentation issue

docs/open-api/openapi.yaml Outdated Show resolved Hide resolved
@jerqi jerqi requested a review from mchades August 15, 2024 09:19
Copy link
Contributor

@mchades mchades left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mchades mchades merged commit 6acf9c9 into apache:main Aug 15, 2024
34 checks passed
github-actions bot pushed a commit that referenced this pull request Aug 15, 2024
### What changes were proposed in this pull request?
Add the open-api for access control.

### Why are the changes needed?

Fix: #2242

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
By hand.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Subtask] Add the open API for access control
3 participants